package com.lzj.demo.design.singleton;

/**
 * 内部类方式实现单例模式
 * */
public class InnerClassSingleton {
    private static class InnerClassSingletonHolder{
        private static final InnerClassSingleton INSTANCE = new InnerClassSingleton();
    }

    private InnerClassSingleton(){}

    public static final InnerClassSingleton getInstance(){
        return InnerClassSingletonHolder.INSTANCE;
    }
}
